XPathResult

public interface XPathResult

An implementation of the DOM W3C XPathResult interface that represents the result of the XPath expression evaluation.

See also

Functions

Link copied to clipboard
public abstract boolean asBoolean()
Returns the XPath result represented as a boolean.
Link copied to clipboard
public abstract double asNumber()
Returns the XPath result represented as a number.
Link copied to clipboard
public abstract Optional<Node> asSingleNode()
Returns an Optional that contains the XPath result represented as a single node or an empty Optional if it does not exist.
Link copied to clipboard
public abstract List<Node> asSnapshotNodes()
Returns the XPath result represented as an immutable list of the snapshot nodes.
Link copied to clipboard
public abstract String asString()
Returns the XPath result represented as a string.
Link copied to clipboard
public abstract boolean isBoolean()
Returns true if the result type is BOOLEAN.
Link copied to clipboard
public abstract boolean isIterator()
Returns true if the result type is UNORDERED_NODE_ITERATOR or ORDERED_NODE_ITERATOR.
Link copied to clipboard
public abstract boolean isNumber()
Returns true if the result type is NUMBER.
Link copied to clipboard
public abstract boolean isSingleNode()
Returns true if the result type is FIRST_ORDERED_NODE or ANY_UNORDERED_NODE.
Link copied to clipboard
public abstract boolean isSnapshotNodes()
Returns true if the result type is ORDERED_NODE_SNAPSHOT or UNORDERED_NODE_SNAPSHOT.
Link copied to clipboard
public abstract boolean isString()
Returns true if the result type is STRING.
Link copied to clipboard
public abstract Optional<Node> iterateNext()
Moves the iterator to the next node in the result set and returns an Optional that contains the Node object referenced by the current iterator.
Link copied to clipboard
public abstract XPathResultType type()
Returns the result type.